<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for components\pagination\dx-pager.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../prettify.css" />
    <link rel="stylesheet" href="../../base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(../../sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="../../index.html">all files</a> / <a href="index.html">components/pagination/</a> dx-pager.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/53</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/38</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">100% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/0</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/53</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;template&gt;
	&lt;ul 
		class="dx-pager clearfix" 
		@click.stop.prevent="clickPage($event)"
	&gt;
		&lt;li  
			v-if="pageCount &gt; 0" 
			:class="{'is-disbaled':1 === currentPage}" 
			class="pre"
		&gt;
			&lt;i 
				class="icon iconfont dx-prev dx-pager--icon"
				aria-hidden="true"
			&gt;
			&lt;/i&gt;
		&lt;/li&gt;
		&lt;li 
			v-if="pageCount &gt; 0"  
			:class="{'is-active': 1 === currentPage}"
			:style="[1 === currentPage &amp;&amp; activeStyle]"
		&gt;
			1
		&lt;/li&gt;
		&lt;li  
			v-if="showPrevMore" 
			:class="[quickprevIconClass]"
			class="dx-more quickpre"
		&gt;
			&lt;i 
				class="icon iconfont dx-ellipsis" 
				aria-hidden="true"
			&gt;
			&lt;/i&gt;
		&lt;/li&gt;
		&lt;li 
			v-for="(page, index) in pager" 
			:key="index"   
			:class="{'is-active': page === currentPage}"
			:style="[page === currentPage &amp;&amp; activeStyle]"
		&gt;
			{{ page }}
		&lt;/li&gt;
		&lt;li 
			v-if="showNextMore"
			:class="[quicknextIconClass]"
			class="dx-more quicknext" 
		&gt;
			&lt;i 
				class="icon iconfont dx-ellipsis" 
				aria-hidden="true"
			&gt;
			&lt;/i&gt;
		&lt;/li&gt;
		&lt;li
			v-if="pageCount &gt; 1"  
			:class="{'is-active': pageCount === currentPage}"
			:style="[pageCount === currentPage &amp;&amp; activeStyle]"
		&gt;
			{{ pageCount }}
		&lt;/li&gt;
		&lt;li 
			v-if="pageCount &gt; 0" 
			:class="{ 'is-disbaled': pageCount === currentPage}" 
			class="next"
		&gt;	
			&lt;i 
				class="icon iconfont dx-next dx-pager--icon" 
				aria-hidden="true"
			&gt;
			&lt;/i&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
&lt;/template&gt;
&lt;script&gt;
	export default {
		name: 'DxPager',
		componentName: 'DxPager',
		props: {
			pageCount: {
				type: Number,
				default: 0
			},
			currentPage: {
				type: Number,
				default: 1
			},
			activeStyle: Object
		},
		data() {
<span class="cstat-no" title="statement not covered" >			return {</span>
				showPrevMore: false,
				showNextMore: false,
				quicknextIconClass: 'dx-icon-more',
				quickprevIconClass: 'dx-icon-more'
			}
		},
		computed: {
			pager() {
				const pages =<span class="cstat-no" title="statement not covered" > []</span>
				const pagerCount =<span class="cstat-no" title="statement not covered" > 7</span>
				const middle =<span class="cstat-no" title="statement not covered" > Math.floor(pagerCount / 2)</span>
&nbsp;
				let pageCount =<span class="cstat-no" title="statement not covered" > parseInt(this.pageCount)</span>
				let currentPage =<span class="cstat-no" title="statement not covered" > parseInt(this.currentPage)</span>
				let showPrevMore =<span class="cstat-no" title="statement not covered" > false</span>
				let showNextMore =<span class="cstat-no" title="statement not covered" > false</span>
				// 判断是否需要显示quickpre和quicknext按钮
<span class="cstat-no" title="statement not covered" >				if (pageCount &gt; pagerCount) {</span>
<span class="cstat-no" title="statement not covered" >					if (currentPage &gt; pagerCount - middle) {</span>
<span class="cstat-no" title="statement not covered" >						showPrevMore = true</span>
					}
<span class="cstat-no" title="statement not covered" >					if (currentPage &lt; pageCount - middle) {</span>
<span class="cstat-no" title="statement not covered" >						showNextMore = true</span>
					}
				}
				// 根据是否显示quickpre和quicknext按钮分情况讨论
<span class="cstat-no" title="statement not covered" >				if (showPrevMore &amp;&amp; !showNextMore) {</span>
<span class="cstat-no" title="statement not covered" >					for (let start = pageCount - pagerCount + 2; start &lt; pageCount; start++) {</span>
<span class="cstat-no" title="statement not covered" >						pages.push(start)</span>
					}
				} else<span class="cstat-no" title="statement not covered" > if (!showPrevMore &amp;&amp; showNextMore) {</span>
<span class="cstat-no" title="statement not covered" >					for (let start = 2; start &lt; pagerCount; start++) {</span>
<span class="cstat-no" title="statement not covered" >						pages.push(start)</span>
					}
				} else<span class="cstat-no" title="statement not covered" > if (showPrevMore &amp;&amp; showNextMore) {</span>
					let offset =<span class="cstat-no" title="statement not covered" > middle - 1</span>
<span class="cstat-no" title="statement not covered" >					for (let start = currentPage - offset, len = currentPage + offset; start &lt;= len; start++) {</span>
<span class="cstat-no" title="statement not covered" >						pages.push(start)</span>
					}
				} else {
<span class="cstat-no" title="statement not covered" >					for (let start = 2; start &lt; pageCount; start++) {</span>
<span class="cstat-no" title="statement not covered" >						pages.push(start)</span>
					}
				}
&nbsp;
<span class="cstat-no" title="statement not covered" >				this.showPrevMore = showPrevMore</span>
<span class="cstat-no" title="statement not covered" >				this.showNextMore = showNextMore</span>
<span class="cstat-no" title="statement not covered" >				return pages</span>
			}
		},
		methods: {
			clickPage($event) {
				let target =<span class="cstat-no" title="statement not covered" > $event.target</span>
<span class="cstat-no" title="statement not covered" >				if (target.tagName === 'UL') {</span>
<span class="cstat-no" title="statement not covered" >					return</span>
				}
&nbsp;
<span class="cstat-no" title="statement not covered" >				while (target.tagName !== 'LI') {</span>
					// 这里代码有一点兼容性不好
<span class="cstat-no" title="statement not covered" >					target = target.parentElement</span>
				}
&nbsp;
				let newPage =<span class="cstat-no" title="statement not covered" > parseInt(target.textContent)</span>
				let currentPage =<span class="cstat-no" title="statement not covered" > this.currentPage</span>
				let pageCount =<span class="cstat-no" title="statement not covered" > this.pageCount</span>
				let className =<span class="cstat-no" title="statement not covered" > target.className</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >				if (className.indexOf('dx-more') !== -1) {</span>
<span class="cstat-no" title="statement not covered" >					if (className.indexOf('quickpre') !== -1) {</span>
<span class="cstat-no" title="statement not covered" >						newPage = currentPage - 5</span>
					} else<span class="cstat-no" title="statement not covered" > if (className.indexOf('quicknext') !== -1) {</span>
<span class="cstat-no" title="statement not covered" >						newPage = currentPage + 5</span>
					}
				} else<span class="cstat-no" title="statement not covered" > if (className.indexOf('pre') !== -1) {</span>
<span class="cstat-no" title="statement not covered" >					newPage = currentPage - 1</span>
				} else<span class="cstat-no" title="statement not covered" > if (className.indexOf('next') !== -1) {</span>
<span class="cstat-no" title="statement not covered" >					newPage = currentPage + 1</span>
				}
<span class="cstat-no" title="statement not covered" >				if (!isNaN(newPage)) {</span>
<span class="cstat-no" title="statement not covered" >					if (newPage &lt; 1) {</span>
<span class="cstat-no" title="statement not covered" >						newPage = 1</span>
					}
<span class="cstat-no" title="statement not covered" >					if (newPage &gt; pageCount) {</span>
<span class="cstat-no" title="statement not covered" >						newPage = pageCount</span>
					}
				}
<span class="cstat-no" title="statement not covered" >				if (newPage !== currentPage) {</span>
<span class="cstat-no" title="statement not covered" >					this.$emit('dx-pager-change', newPage)</span>
				}
			}
		}
	}
&lt;/script&gt;
&lt;style lang="scss"&gt;
	@include B(pager) {
		display: inline-block;
		&gt;li {
			float: left;
			padding: 0 0.8rem;
		    border: 0.1rem solid #d1dbe5;
		    border-right: 0;
		    background-color: $--dx-pager-li-background-color;
		    font-size: $--dx-pager-li-font-size;
		    min-width: 2.8rem;
		    line-height: $--dx-pager-li-line-height;
		    cursor: pointer;
		    text-align: center;
		    &amp;:last-child {
		    	border-right: 0.1rem solid #d1dbe5;
		    }
		    @include when(active) {
				background-color: $--dx-pager-li-background-color-active;
		 		color: $--dx-pager-li-color;
			}
			@include when(disbaled) {
				cursor: not-allowed;
			}
		}
		// 图标
		@include M(icon) {
			line-height: $--dx-pager-li-line-height;
			font-size: $--dx-pager-li-font-size;
		}
	}
&lt;/style&gt;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sun Feb 24 2019 15:08:50 GMT+0800 (中国标准时间)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="../../sorter.js"></script>
</body>
</html>
